using System;
using System.Collections.Generic;

namespace Elephant.Framework
{
    public interface IEntityCollection : ICollection<Entity>
    {
        Entity Find(string name);
        Entity FindWith<T>() where T : EntityComponent;
        List<Entity> FindAllWith<T>() where T : EntityComponent;

        T Find<T>(string name) where T : EntityComponent;

        bool Remove(string name);
        bool RemoveImmediate(string name);
        bool RemoveImmediate(Entity entity);
        bool Remove(EntityComponent component);
        bool RemoveImmediate(EntityComponent component, bool updateDependencies);

        event EventHandler<EntityEventArgs> EntityAdded;
        event EventHandler<EntityEventArgs> EntityRemoved;
    }
}
